package com.teradata.webmvc.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @RestController = @Configuration + @ResponseBody
 */
@RestController
public class UserController {

    Logger logger = LoggerFactory.getLogger(UserController.class);

    @GetMapping("/hello")
    //@ResponseBody
    public Map<String, String> hello() {
        HashMap<String, String> hello = new HashMap<>();
        hello.put("data", "hello 小红");
        hello.put("status", "SUCCESS");
        return hello;
    }

}
